#include "udp_server.hpp"
#include "route.hpp"
std::string test (const std::string&s)
{
    std::string ret=s+"hello";
    return ret;
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        std::cerr<<"Please enter# port"<<std::endl;
        exit(1);
    }
    route r;
    uint16_t port=std::stoi(argv[1]);
    udp_server server(port,[&r](int sockfd,const std::string& message,InetAddr&peer)
    {
        r.message_send(sockfd,message,peer);
    });
    server.Init();
    server.Start();
}